import request from '@/utils/request';

export async function query() {
  return request('/api/users');
}

export async function queryCurrent() {
  return request('/api/currentUser');
}


// 查询个人详情，包含菜单，组织，用户信息
export async function queryUserDetail(params) {
  return request('/s/login/getUserDetail', {
    method: 'POST',
    data: params,
  });
}

// 修改密码
export async function changePassword(params) {
  return request('/s/user/updatePassword', {
    method: 'POST',
    data: params,
  });
}

// 查询密码规则
export async function pwdrule(params) {
  return request('/s/pwdrule/query', {
    method: 'POST',
    data: params,
  });
}

// 使用空间
export async function userfilespace(params) {
  return request('/b/userfilespace/query', {
    method: 'POST',
    data: params,
  });
}

/**
 * 退出登录
 * @param params
 * @returns {Promise<void>}
 */
export async function removeToken(params) {
  return request('/s/login/removeToken', {
    method: 'POST',
    data: params,
  });
}


